DROP TABLE IF EXISTS jms_ods.yl_tmsnew_tms_vehicle_point;
CREATE EXTERNAL TABLE jms_ods.yl_tmsnew_tms_vehicle_point(
 ID bigint comment "经停点编码",  --NUMBER(11)
 LINE_ID bigint comment "车线编码",  --NUMBER(11)
 SORT_NUM bigint comment "顺序编号",  --NUMBER(11)
 NETWORK_ID bigint comment "经停网点ID",  --NUMBER(11)
 NETWORK_CODE string comment "经停网点编号",  --NVARCHAR2(30)
 NETWORK_NAME string comment "经停网点名称",  --NVARCHAR2(60)
 ROADSECTION_ID bigint comment "路段编号",  --NUMBER(11)
 PLANNED_ARRIVAL_DATE bigint comment "规划到达日期",  --NUMBER(11)
 PLANNED_ARRIVAL_TIME string comment "规划到达时间",  --NVARCHAR2(5)
 PLANNED_DEPARTURE_DATE bigint comment "规划离开日期",  --NUMBER(11)
 PLANNED_DEPARTURE_TIME string comment "规划离开时间",  --NVARCHAR2(5)
 STOP_TIME bigint comment "经停时长",  --NUMBER(11)
 USETIME bigint comment "运输耗时(MIN)",  --NUMBER(11)
 MILEAGE double comment "规划里程(KM)",  --NUMBER
 SPEED double comment "时速(KM/H)",  --NUMBER
 USETIME_UPD bigint comment "调整运输耗时(MIN)",  --NUMBER(11)
 MILEAGE_UPD double comment "调整规划里程(KM)",  --NUMBER
 SPEED_UPD double comment "调整时速(KM/H)",  --NUMBER
 BATCH_TIME string comment "批次时间",  --NVARCHAR2(50)
 HANDLING_TYPE string comment "装卸类型",  --NVARCHAR2(20)
 DELIVERY_NETWORKLIST string comment "配载网点",  --NCLOB
 CREATE_BY bigint comment "创建人ID",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人姓名",  --NVARCHAR2(20)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_BY bigint comment "更新人ID",  --NUMBER(11)
 UPDATE_BY_NAME string comment "更新人姓名",  --NVARCHAR2(20)
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 ROADSECTION_CODE string comment "路段编码",  --NVARCHAR2(20)
 SIMPLE_NAME string comment "网点简称",  --NVARCHAR2(20)
 LATEST_ARRIVAL_TIME string comment "最晚到车时间",  --NVARCHAR2(5)
 LATEST_ARRIVAL_DAY bigint comment "最晚到车日期"  --NUMBER(11)
 )
 COMMENT '经停点'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_tmsnew_tms_vehicle_point'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );

MSCK REPAIR TABLE jms_ods.yl_tmsnew_tms_vehicle_point;